// Map 对象保存键值对。任何值(对象或者原始值) 都可以作为⼀个键或⼀个值。
const launches = new Map();
// 数据⽰例
const launch = {
    flightNumber: 100,
    mission: 'Kepler Exploration X',
    rocket: 'Explorer IS1',
    launchDate: new Date('December 27, 2030'),
    destination: 'Kepler-442 b',
    customer: ['GKD', 'NASA'],
    upcoming: true,
    success: true,
};
// 设置键值对
launches.set(launch.flightNumber, launch);

function getAllLaunches() {
    return Array.from(launches.values());
    }
module.exports = {
    getAllLaunches,
};